#include<stdlib.h>
#include"tree.h"
#include<stdio.h>

void creat_tree(Tree* tree) {
	char val;
	scanf_s("%c", &val);
	fflush(stdin);
	if (val == '#') {
		*tree = NULL;
	}
	else {
		(*tree) = (Node*)calloc(1, sizeof(Node));
		if ((*tree) == NULL) {
			exit(1);
		}
		(*tree)->data = val;
		creat_tree(&(*tree)->left_child);
		creat_tree(&(*tree)->right_child);
	}
}